<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%--
  Created by IntelliJ IDEA.
  User: 82387
  Date: 2018/10/12
  Time: 16:17
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ include file="/WEB-INF/jsp/meta.jsp"%>
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
    <script type="text/javascript" src="${ctx}/static/js/jquery.B.js"></script>
    <script type="text/javascript" src="${ctx}/static/js/jquery.PrintArea.js"></script>
</head>
<body>
<div style="width: 100%;margin-top: 10px;" >
    <a href="javascript:void(0)" onclick="doDeptPrint()"> 打印</a>
</div>
<div style="width:100%;" id="deptPrint">
    <style type="text/css">
        table{ border-collapse:collapse;}
        table tr td{ border-bottom:1px solid #000000;text-align: center;font-size: smaller}
        table tr{height: 20px}
    </style>
    <c:if test="${empty carPayList}">
        未查询到该月工资信息
    </c:if>
    <c:if test="${not empty carPayList}">
        <div id="base_info" style="width:100%;">
            <div style="text-align: center;margin-bottom: 10px;margin-top: 10px"><h2>${month}</h2></div>
            <table style="width:100%;"  frame=hsides>
                    <tr>
                        <td>姓名</td>
                        <td>车辆使用费</td>
                        <td>签字</td>
                    </tr>
                <c:forEach items="${carPayList}" var="carPay">
                    <tr>
                        <td>${carPay.userName}</td>
                        <td>${carPay.carPay}</td>
                        <td></td>
                    </tr>
                </c:forEach>
            </table>
            <h4>总人数:${fn:length(carPayList)}</h4>
        </div>
    </c:if>
</div>
<script type="text/javascript">
    function doDeptPrint() {
        $("#deptPrint").printArea();
    }
</script>
</body>
</html>
